package day12_thread_code.com.itheima.d7_thread_comunication;

public class MakerThread extends Thread{
    private Desk desk;
    public MakerThread(Desk desk, String name) {
        super(name);
        this.desk = desk;
    }

    @Override
    public void run() {
        while (true){
            try{
                Thread.sleep(1000);
                desk.put();
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }
}
